

package com.scs.application.modules.cert.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.scs.application.core.model.DataEntity;
import com.scs.application.core.utils.excel.annotation.ExcelAutoColumnSize;
import com.scs.application.core.utils.excel.annotation.ExcelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 资质导入对象
 *
 */
@ExcelAutoColumnSize
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
public class ExcelCertDTO extends DataEntity implements IExcelDataModel, IExcelModel, Serializable {

    @ExcelComment(notNull = true, example = "医院测试")
    @Excel(name = "医院名称")
    @NotBlank(message = "医院名称不能为空")
    private String hospitalName;

    @ExcelComment(notNull = true, example = "供应商测试")
    @Excel(name = "供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    private String supplierName;

    @Excel(name = "供应商营业执照证号")
    @ExcelComment(value = "选填；如果没有就不填", example = "sp001")
    // 供应商营业执照证号
    private String spLicenseNo;

    @ExcelComment(value = "选填；效期格式：2020-01-01， 如果没有就不填，效期为长期时，请填 2099-11-01", example = "2050-11-01")
    @Excel(name = "供应商营业执照效期", format = "yyyy-MM-dd")
    // 供应商营业执照效期
    private Date spLicenseExpiryDate;

    @Excel(name = "供应商医疗器械经营许可证证号")
    @ExcelComment(value = "选填；如果没有就不填", example = "sp000001")
    // 供应商医疗器械经营许可证证号
    private String medicalNo;

    @ExcelComment(value = "选填；效期格式：2020-01-01，如果没有就不填，效期为长期时，请填 2099-11-01", example = "2050-11-01")
    @Excel(name = "供应商医疗器械经营许可证效期", format = "yyyy-MM-dd")
    // 供应商医疗器械经营许可证效期
    private Date medicalExpiryDate;

    /*@Excel(name = "供应商代理商经营许可证证号")
    // 供应商代理商经营许可证证号
    private String permitNo;

    @Excel(name = "供应商代理商经营许可证效期")
    // 供应商代理商经营许可证效期
    private Date permitExpiryDate;

    *//*@Excel(name = "供应商质量保证协议证号")
    // 供应商质量保证协议证号
    private String QSVNo;*//*

    @Excel(name = "供应商质量保证协议效期")
    // 供应商质量保证协议效期
    private Date QSVExpiryDate;

    *//*@Excel(name = "供应商印章印模备案表证号")
    // 供应商印章印模备案表证号
    private String sealNo;*//*

    @Excel(name = "供应商印章印模备案表效期")
    // 供应商印章印模备案表效期
    private Date sealExpiryDate;

    *//*@Excel(name = "供应商法人委托书证号")
    // 供应商法人委托书证号
    private String spAttorneyNo;*//*

    @Excel(name = "供应商法人委托书效期")
    // 供应商法人委托书效期
    private Date spAttorneyExpiryDate;

    @Excel(name = "供应商代理商营业执照证号")
    // 供应商代理商营业执照证号
    private String agentNo;

    @Excel(name = "供应商代理商营业执照效期")
    // 供应商代理商营业执照效期
    private Date agentExpiryDate;*/

    @ExcelComment(notNull = true, value = "院内耗材名称", example = "商品测试")
    @Excel(name = "品名")
    @NotBlank(message = "品名不能为空")
    // 耗材名称
    private String materialName;

    @ExcelComment(notNull = true, value = "如果规格为空就填：默认品规", example = "规格测试")
    @Excel(name = "规格")
    @NotBlank(message = "规格不能为空")
    @Length(min = 1, max = 100, message = "规格长度必须介于 1 和 100 之间")
    // 耗材编码
    private String materialSpec;

    @Excel(name = "注册证号")
    @ExcelComment(value = "选填；如果没有就不填", example = "国械注进001")
    // 注册证号
    private String registrationNo;

    @ExcelComment(value = "选填；效期格式：2020-01-01，如果没有就不填，效期为长期时，请填 2099-11-01", example = "2050-01-01")
    @Excel(name = "注册证效期", format = "yyyy-MM-dd")
    // 注册证效期
    private Date registrationExpiryDate;

    /*@Excel(name = "产品照片证号")
    // 产品照片证号
    private String ppNo;*/

    /*@Excel(name = "产品照片效期")
    // 产品照片效期
    private Date ppExpiryDate;

    *//*@Excel(name = "安全评价报告证号")
    // 安全评价报告证号
    private String reportNo;*//*

    @Excel(name = "安全评价报告效期")
    // 安全评价报告效期
    private Date reportExpiryDate;*/

    @ExcelComment(notNull = true, value = "如果没有就填：默认厂商", example = "厂商测试")
    @Excel(name = "厂商名称")
    @NotBlank(message = "厂商名称不能为空")
    // 厂商名称
    private String manufacturerName;

    @Excel(name = "厂商营业执照证号")
    @ExcelComment(value = "选填；如果没有就不填", example = "mfg001")
    // 厂商营业执照证号
    private String maLicenseNo;

    @ExcelComment(value = "选填；效期格式：2020-01-01，如果没有就不填；效期为长期时，请填 2099-11-01", example = "2050-11-01")
    @Excel(name = "厂商营业执照效期", format = "yyyy-MM-dd")
    // 厂商营业执照效期
    private Date maLicenseExpiryDate;

    /*@Excel(name = "授权委托书证号")
    // 授权委托书证号
    private String maAttorneyNo;*/

    @ExcelComment(value = "选填；如果没有就不填，效期为长期时，请填 2099-11-01", example = "2050-11-01")
    @Excel(name = "授权委托书效期", format = "yyyy-MM-dd")
    // 授权委托书效期
    private Date maAttorneyExpiryDate;

    @Excel(name = "厂商生产经营(许可)证证号")
    @ExcelComment(value = "选填；如果没有就不填", example = "mfg001")
    // 厂商生产经营(许可)证证号
    private String productNo;

    @ExcelComment(value = "选填；效期格式：2020-01-01，如果没有就不填，效期为长期时，请填 2099-11-01", example = "2050-11-01")
    @Excel(name = "厂商生产经营(许可)证效期", format = "yyyy-MM-dd")
    // 厂商生产经营(许可)证效期
    private Date productExpiryDate;

    /*@Excel(name = "生产企业卫生许可证证号")
    // 生产企业卫生许可证证号
    private String hygieneNo;*/

    /*@ExcelComment(example = "国械注进20153772356")
    @Excel(name = "生产企业卫生许可证效期")
    // 生产企业卫生许可证效期
    private Date hygieneExpiryDate;

    *//*@Excel(name = "省级以上检测报告证号")
    // 省级以上检测报告证号
    private String testReportNo;*//*

    @ExcelComment(example = "国械注进20153772356")
    @Excel(name = "省级以上检测报告效期")
    // 省级以上检测报告效期
    private Date testReportExpiryDate;*/

    @Excel(name = "备注")
    // 备注
    private String remark;

    private Integer rowNum;
    private String errorMsg;

    @Override
    public Integer getRowNum() {
        return rowNum;
    }

    @Override
    public void setRowNum(Integer rowNum) {
        this.rowNum = rowNum;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }

    @Override
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
